package com.spogher.components.dropdownChoices;

import java.util.List;

import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.IChoiceRenderer;

import com.spogher.bsc.data.dataobjects.Championship;

public class ChampionshipDropDownChoice extends DropDownChoice<Championship>{

	private static final long serialVersionUID = 1L;

	public ChampionshipDropDownChoice(String id, List<Championship> choices) {
		super(id, choices, new IChoiceRenderer<Championship>() {

			private static final long serialVersionUID = 1L;

			public Object getDisplayValue(Championship object) {
				return object.getName();
			}

			public String getIdValue(Championship object, int index) {
				return object.getName();
			}
		});
	}

}
